<?php

class Over_under extends CI_Model {

	public $under2 = array();

	public function find_element_placering($id,$type){

		$this->load->model('core/element');

        $element = new element();
		$element->find_under($id);
		$under = $element->under;
		//print_r($under);
		$element->find_over($id);
		$over = $element->over;

		foreach($over as $o) {
			//echo $o['over_id'].br();

		}
		//echo "<ul>";

		foreach($under as $u) {
			
			//echo "<li>".$u."</li><ul>";
			$element->specificer_type($u['under_id'],$type);
			$data['type_spec'] = $element->type_spec;
			$element->find_under($u['under_id']);
			$underunder = $element->under;
			$this->under2[] = array(
				'id' => $u['under_id'],
				'navn' => $u['navn'],
				'type' => $element->type_spec	,
				'underunder' => $underunder,


			);

			foreach($underunder as $uu) {
				//echo "<li>".$uu."</li>";

			}
			//echo "</ul>";
			// print_r($underunder);
			
		}
		//echo "</ul>";


	}

}


?>
